3.2 \(\int x^2 \cosh (a+b x^2) \, dx\)

Optimal. Leaf size=69 \[ \frac {\sqrt {\pi } e^{-a} \text {erf}\left (\sqrt {b} x\right )}{8 b^{3/2}}-\frac {\sqrt {\pi } e^a \text {erfi}\left (\sqrt {b} x\right )}{8 b^{3/2}}+\frac {x \sinh \left (a+b x^2\right )}{2 b} \]

[Out]

1/2*x*sinh(b*x^2+a)/b+1/8*erf(x*b^(1/2))*Pi^(1/2)/b^(3/2)/exp(a)-1/8*exp(a)*erfi(x*b^(1/2))*Pi^(1/2)/b^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5325, 5298, 2204, 2205} \[ \frac {\sqrt {\pi } e^{-a} \text {Erf}\left (\sqrt {b} x\right )}{8 b^{3/2}}-\frac {\sqrt {\pi } e^a \text {Erfi}\left (\sqrt {b} x\right )}{8 b^{3/2}}+\frac {x \sinh \left (a+b x^2\right )}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[x^2*Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x])/(8*b^(3/2)*E^a) - (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(8*b^(3/2)) + (x*Sinh[a + b*x^2])/(
2*b)

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5298

Int[Sinh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] - Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 5325

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)]*((e_.)*(x_))^(m_.), x_Symbol] :> Simp[(e^(n - 1)*(e*x)^(m - n + 1)*Sinh[c +
d*x^n])/(d*n), x] - Dist[(e^n*(m - n + 1))/(d*n), Int[(e*x)^(m - n)*Sinh[c + d*x^n], x], x] /; FreeQ[{c, d, e}
, x] && IGtQ[n, 0] && LtQ[0, n, m + 1]

Rubi steps

\begin {align*} \int x^2 \cosh \left (a+b x^2\right ) \, dx &=\frac {x \sinh \left (a+b x^2\right )}{2 b}-\frac {\int \sinh \left (a+b x^2\right ) \, dx}{2 b}\\ &=\frac {x \sinh \left (a+b x^2\right )}{2 b}+\frac {\int e^{-a-b x^2} \, dx}{4 b}-\frac {\int e^{a+b x^2} \, dx}{4 b}\\ &=\frac {e^{-a} \sqrt {\pi } \text {erf}\left (\sqrt {b} x\right )}{8 b^{3/2}}-\frac {e^a \sqrt {\pi } \text {erfi}\left (\sqrt {b} x\right )}{8 b^{3/2}}+\frac {x \sinh \left (a+b x^2\right )}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 67, normalized size = 0.97 \[ \frac {\sqrt {\pi } (\cosh (a)-\sinh (a)) \text {erf}\left (\sqrt {b} x\right )-\sqrt {\pi } (\sinh (a)+\cosh (a)) \text {erfi}\left (\sqrt {b} x\right )+4 \sqrt {b} x \sinh \left (a+b x^2\right )}{8 b^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x]*(Cosh[a] - Sinh[a]) - Sqrt[Pi]*Erfi[Sqrt[b]*x]*(Cosh[a] + Sinh[a]) + 4*Sqrt[b]*x*Sinh
[a + b*x^2])/(8*b^(3/2))

________________________________________________________________________________________

fricas [B]  time = 0.48, size = 189, normalized size = 2.74 \[ \frac {2 \, b x \cosh \left (b x^{2} + a\right )^{2} + 4 \, b x \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right ) + 2 \, b x \sinh \left (b x^{2} + a\right )^{2} + \sqrt {\pi } {\left (\cosh \left (b x^{2} + a\right ) \cosh \relax (a) + {\left (\cosh \relax (a) + \sinh \relax (a)\right )} \sinh \left (b x^{2} + a\right ) + \cosh \left (b x^{2} + a\right ) \sinh \relax (a)\right )} \sqrt {-b} \operatorname {erf}\left (\sqrt {-b} x\right ) + \sqrt {\pi } {\left (\cosh \left (b x^{2} + a\right ) \cosh \relax (a) + {\left (\cosh \relax (a) - \sinh \relax (a)\right )} \sinh \left (b x^{2} + a\right ) - \cosh \left (b x^{2} + a\right ) \sinh \relax (a)\right )} \sqrt {b} \operatorname {erf}\left (\sqrt {b} x\right ) - 2 \, b x}{8 \, {\left (b^{2} \cosh \left (b x^{2} + a\right ) + b^{2} \sinh \left (b x^{2} + a\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(b*x^2+a),x, algorithm="fricas")

[Out]

1/8*(2*b*x*cosh(b*x^2 + a)^2 + 4*b*x*cosh(b*x^2 + a)*sinh(b*x^2 + a) + 2*b*x*sinh(b*x^2 + a)^2 + sqrt(pi)*(cos
h(b*x^2 + a)*cosh(a) + (cosh(a) + sinh(a))*sinh(b*x^2 + a) + cosh(b*x^2 + a)*sinh(a))*sqrt(-b)*erf(sqrt(-b)*x)
 + sqrt(pi)*(cosh(b*x^2 + a)*cosh(a) + (cosh(a) - sinh(a))*sinh(b*x^2 + a) - cosh(b*x^2 + a)*sinh(a))*sqrt(b)*
erf(sqrt(b)*x) - 2*b*x)/(b^2*cosh(b*x^2 + a) + b^2*sinh(b*x^2 + a))

________________________________________________________________________________________

giac [A]  time = 0.12, size = 75, normalized size = 1.09 \[ \frac {x e^{\left (b x^{2} + a\right )}}{4 \, b} - \frac {x e^{\left (-b x^{2} - a\right )}}{4 \, b} - \frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {b} x\right ) e^{\left (-a\right )}}{8 \, b^{\frac {3}{2}}} + \frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {-b} x\right ) e^{a}}{8 \, \sqrt {-b} b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(b*x^2+a),x, algorithm="giac")

[Out]

1/4*x*e^(b*x^2 + a)/b - 1/4*x*e^(-b*x^2 - a)/b - 1/8*sqrt(pi)*erf(-sqrt(b)*x)*e^(-a)/b^(3/2) + 1/8*sqrt(pi)*er
f(-sqrt(-b)*x)*e^a/(sqrt(-b)*b)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 74, normalized size = 1.07 \[ -\frac {{\mathrm e}^{-a} x \,{\mathrm e}^{-b \,x^{2}}}{4 b}+\frac {{\mathrm e}^{-a} \sqrt {\pi }\, \erf \left (x \sqrt {b}\right )}{8 b^{\frac {3}{2}}}+\frac {{\mathrm e}^{a} {\mathrm e}^{b \,x^{2}} x}{4 b}-\frac {{\mathrm e}^{a} \sqrt {\pi }\, \erf \left (\sqrt {-b}\, x \right )}{8 b \sqrt {-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cosh(b*x^2+a),x)

[Out]

-1/4*exp(-a)/b*x*exp(-b*x^2)+1/8*exp(-a)/b^(3/2)*Pi^(1/2)*erf(x*b^(1/2))+1/4*exp(a)*exp(b*x^2)*x/b-1/8*exp(a)/
b*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)*x)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 110, normalized size = 1.59 \[ \frac {1}{3} \, x^{3} \cosh \left (b x^{2} + a\right ) - \frac {1}{24} \, b {\left (\frac {2 \, {\left (2 \, b x^{3} e^{a} - 3 \, x e^{a}\right )} e^{\left (b x^{2}\right )}}{b^{2}} + \frac {2 \, {\left (2 \, b x^{3} + 3 \, x\right )} e^{\left (-b x^{2} - a\right )}}{b^{2}} - \frac {3 \, \sqrt {\pi } \operatorname {erf}\left (\sqrt {b} x\right ) e^{\left (-a\right )}}{b^{\frac {5}{2}}} + \frac {3 \, \sqrt {\pi } \operatorname {erf}\left (\sqrt {-b} x\right ) e^{a}}{\sqrt {-b} b^{2}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*cosh(b*x^2+a),x, algorithm="maxima")

[Out]

1/3*x^3*cosh(b*x^2 + a) - 1/24*b*(2*(2*b*x^3*e^a - 3*x*e^a)*e^(b*x^2)/b^2 + 2*(2*b*x^3 + 3*x)*e^(-b*x^2 - a)/b
^2 - 3*sqrt(pi)*erf(sqrt(b)*x)*e^(-a)/b^(5/2) + 3*sqrt(pi)*erf(sqrt(-b)*x)*e^a/(sqrt(-b)*b^2))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x^2\,\mathrm {cosh}\left (b\,x^2+a\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*cosh(a + b*x^2),x)

[Out]

int(x^2*cosh(a + b*x^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \cosh {\left (a + b x^{2} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*cosh(b*x**2+a),x)

[Out]

Integral(x**2*cosh(a + b*x**2), x)

________________________________________________________________________________________